cmake_minimum_required(VERSION 3.6)
project(catch2-download NONE)

include(ExternalProject)
ExternalProject_Add(
    catch2
    PREFIX .
    GIT_REPOSITORY https://github.com/catchorg/Catch2.git
    GIT_TAG        v3.4.0
    GIT_CONFIG     advice.detachedHead=false  # otherwise we'll get "You are in 'detached HEAD' state..."
    SOURCE_DIR     "${CMAKE_BINARY_DIR}/third-party/catch2"
    GIT_SHALLOW    1        # No history needed (requires cmake 3.6)
    # Override default steps with no action, we just want the clone step.
    CONFIGURE_COMMAND ""
    BUILD_COMMAND ""
    INSTALL_COMMAND ""
    )


